package org.apache.flink.kubernetes.kubeclient.decorators;

import org.apache.flink.kubernetes.kubeclient.ComponentPod;

import io.fabric8.kubernetes.api.model.HasMetadata;

import java.io.IOException;
import java.util.List;

/**
 * @类名: KubernetesStepDecorator
 * @说明: pod装饰器
 *
 * @author   leehom
 * @Date	 2024年4月3日 下午1:49:55
 * 修改记录：
 *
 * @see 	 
 */
public interface KubernetesStepDecorator {

    /**
     * 装饰组件pod
     * Apply transformations to the given 组件Pod in accordance with this feature. This can include
     * adding labels/annotations, mounting volumes, and setting startup command or parameters, etc.
     */
    ComponentPod decoratePod(ComponentPod componentPod);

    /**
     * Build the accompanying Kubernetes resources that should be introduced to support this
     * feature. This could only be applicable on the client-side submission process.
     */
    List<HasMetadata> buildAccompanyingKubernetesResources() throws IOException;
}
